package com.yidu.labyrinth.vo;

/**
 * @描述：
 * @ClassName:ssh
 * @backage:com.yidu.ssh.vo
 * @Date:2019 2019/9/19 21:39
 * @Author:易嵘
 **/
public class Pages {

    private Integer page;//当前的页数
    private Integer limit;//显示的行数
    private Integer overRows;//总行数
    private Integer outPage;//从哪行开始
    private Integer overPage;//总页数

    public Integer getPage() {
        return page;
    }

    public void setPage(Integer page) {
        this.page = page;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getOverRows() {
        return overRows;
    }

    public void setOverRows(Integer overRows) {
        this.overRows = overRows;
    }

    public Integer getOutPage() {

        outPage=page;
        if(outPage==0){
            outPage=1;
        }
        outPage=(outPage-1)*limit;
        return outPage;
    }

    public void setOutPage(Integer outPage) {
        this.outPage = outPage;
    }

    public Integer getOverPage() {
        if(overRows%limit==0){
            overPage= overRows/limit;
        }else{
            overPage= overRows/limit+1;
        }
        return overPage;
    }

    public void setOverPage(Integer outLimit) {
        this.overPage = outLimit;
    }
}
